<?php
/**
 * Created by PhpStorm.
 * User: xiaofeng
 * motto: 现在的努力是为了小时候吹过的牛逼！
 * Date: 2020/2/17
 * Time: 21:31
 */
declare(strict_types=1);
namespace app\common\lib;

class Num {

    public static function getCode(int $len = 4) : int{
        $code = rand(1000,9999);
        if ($len == 6){
            $code = rand(100000,999999);
        }
        return $code;
    }
}
